#https://docs.openeuler.org/zh/docs/20.09/docs/Virtualization/%E8%99%9A%E6%8B%9F%E6%9C%BA%E9%85%8D%E7%BD%AE.html
prepare()
{
   curl -LO http://121.36.84.172/dailybuild/EBS-openEuler-Mainline/openeuler-2025-03-03-07-39-19/virtual_machine_img/aarch64/openEuler-Mainline-aarch64.qcow2.xz
   unxz openEuler-Mainline-aarch64.qcow2.xz
   ln -s openEuler-Mainline-aarch64.qcow2 /mnt/openEuler-image.qcow2

  # wget https://repo.openeuler.org/openEuler-24.03-LTS/everything/aarch64/Packages/edk2-aarch64-202308-7.oe2403.noarch.rpm
  nmcli c add type bridge ifname br-ctrl con-name br-ctrl ipv4.addresses 127.0.3.1/32 ipv4.method manual
  nmcli c add type ethernet ifname eth9 master br-ctrl con-name ctrl-sl
  #nmcli con modify eth9 ipv4.method manual ipv4.addresses 192.168.10.103/24
    
  nmcli c add type bond ifname bond0 con-name bond0 mode active-backup ipv4.method manual ipv4.addresses 127.0.2.1/32
  nmcli con add type bond-slave ifname enp2s0f0 master bond0

  nmcli connection add type vlan con-name VLAN.EXT id 20 dev bond0 ipv4.method manual ipv4.addresses 192.168.20.103/24 ifname VLAN.EXT
}


virsh define vm.xml

virsh start euler
